<script setup>
import {
    Management,
    Promotion,
    UserFilled,
    User,
    Crop,
    EditPen,
    SwitchButton,
    CaretBottom
} from '@element-plus/icons-vue'
import avatar from '@/assets/default.png'
</script>

<template>
    <!--container是element-plus的容器-->
    <el-container class="layout-container">
        <!-- 左侧菜单 -->
        <el-aside width="200px">
            <div class="el-aside__logo"></div>
            <!--element-plus的菜单标签-->
            <el-menu active-text-color="#ffd04b" background-color="#232323"  text-color="#fff"
                router>
                <!--菜单项-->
                <el-menu-item index="/yanjiusheng/student">
                    <el-icon>
                        <Management />
                    </el-icon>
                    <span>学生管理</span>
                </el-menu-item>
                <el-menu-item index="/yanjiusheng/academic">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>学业成绩管理</span>
                </el-menu-item>
                <el-menu-item index="/yanjiusheng/total_score">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>总成绩管理</span>
                </el-menu-item>
                <el-menu-item index="/yanjiusheng/rules">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>规则管理</span>
                </el-menu-item>
                <el-menu-item index="/yanjiusheng/studentin2">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>研二奖学金</span>
                </el-menu-item>
                <el-menu-item index="/yanjiusheng/studentin3">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>研三奖学金</span>
                </el-menu-item>

            </el-menu>
        </el-aside>
        <!-- 右侧主区域 -->
        <el-container>
            <!-- 头部区域 -->
            <el-header>
                <div><strong></strong></div>
                <el-dropdown placement="bottom-end">
                    <span class="el-dropdown__box">
                        <el-avatar :src="avatar" />
                        <el-icon>
                            <CaretBottom />
                        </el-icon>
                    </span>
                    <template #dropdown>
                    </template>
                </el-dropdown>
            </el-header>
            <!-- 中间区域 -->
            <el-main>
                <!-- <div style="width: 1290px; height: 570px;border: 1px solid red;">
                    内容展示区
                </div> -->
                <router-view></router-view>
            </el-main>
            <!-- 底部区域 -->
            <el-footer></el-footer>
        </el-container>
    </el-container>
</template>

<style lang="scss" scoped>
.layout-container {
    height: 100vh;

    .el-aside {
        background-color: #232323;

        &__logo {
            height: 120px;
            background: url('@/assets/yanjiusheng.png') no-repeat center / 250px auto;
            
        }

        .el-menu {
            border-right: none;
        }
    }

    .el-header {
        background-color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .el-dropdown__box {
            display: flex;
            align-items: center;

            .el-icon {
                color: #999;
                margin-left: 10px;
            }

            &:active,
            &:focus {
                outline: none;
            }
        }
    }

    .el-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #666;
    }
}
</style>